#{extends 'main.html' /}
#{set title:'Portal Administrador - Buscar Professor' /}

<div id="container">

	<!-- Page header -->
	<div id="header">
		<h1>SIGCFC </h1>
	</div>

	<div id="content_wrap">
		<!-- Navigation -->
		<div id="nav">
		  <ul>		  	
			<li>
				#{a @Application.portalAdministrador()}Portal Administrador#{/a}
			</li>
		  	</BR>
		  	
			<center>Professor</center>
			<li>
				#{a @ProfessorMBean.cadastroProfessor()}Cadastrar Professor#{/a}
			</li>
			<li>
				#{a @ProfessorMBean.listarProfessor()}Listar Professor#{/a}
			</li>
			<li>
				#{a @ProfessorMBean.buscarProfessor()}Buscar Professor#{/a}
			</li>
						
		  </ul>
	  	</div>

		<div id="main">
			<center><h1>Buscar Professor</h1></center>
			#{form @ProfessorMBean.actionBuscar()}
			<center>					
			CPF:
			<input type="text" name="cpf" id="cpf" value="${params.cpf}" />
			<input type="submit" value="Buscar"/>
			</center>
			#{/form}
	
#{if professor!=null}
			<hr/>	
			<center><table cellspacing="2" cellpadding="2" border="1">
					<tr>
						<th>
							Nome
						</th>
						<td>
							${professor.nome}
						</td>
					</tr>
					<tr>
						<th>
							CNH
						</th>
						<td>
							${professor.cnh}
						</td>
					</tr>
					<tr>
						<th>
							Data Expedição CNH
						</th>
						<td>
							${professor.expCnh}
						</td>
					</tr>
					<tr>
						<th>
							CPF
						</th>
						<td>
							${professor.cpf}
						</td>
					</tr>
					<tr>
						<th>
							Data de Nascimento
						</th>
						<td>
							${professor.dataNascimento}
						</td>
					</tr>
			</table></center>
			</BR>
			
			<center>
				<table border="0">
					<td>
						<tr>
						#{form @ProfessorMBean.editarProfessor(professor.cpf)} 
			               <input type="submit" value="Editar"/>  
			           #{/form}
			           </tr>
			           <tr>
			           #{form @ProfessorMBean.actionRemover(professor.cpf)}  
			           	<input type="submit" value="Remover" onclick = "return confirmaExcluir()"/> 
			           #{/form}
			           </tr>
					</td>
				</table>
			</center>
			
#{/if}
		<div class="brclear"></div>
		</div>
	</div>
  <div id="footer">Sistema de Gestão para Centro de Formação de Condutores<br>TecByte</div>

</div>

<style type="text/css">
body {
	color: #FFFFFF;
}